package com.quanyan.travel.entity.vo;

import com.alibaba.fastjson.JSON;
import com.quanyan.common.vo.Image;
import com.quanyan.common.vo.Video;

import java.io.Serializable;

/**
 * Created by xiao.lai on 16/5/26.
 *
 * 多媒体对象
 *
 */
public class MultiMedia implements Serializable{

    public static void main(String[] args) {
        Video v = new Video();
        v.setId(1);
        v.setImageUrl("https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo_top_ca79a146.png");
        v.setVideoUrl("http://192.168.31.222:8089/zouyiqiang/bbb.mp4");

        Image image = new Image();
        image.setId(12);
        image.setImageUrl("https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo_top_ca79a146.png");

        MultiMedia multiMedia = new MultiMedia();
        multiMedia.setImage(image);
        multiMedia.setVideo(v);
        multiMedia.setType((byte) 1);

        System.out.println(JSON.toJSONString(multiMedia));


    }


    private static final long serialVersionUID = -600807997322788697L;
    private Video video;

    private Image image;

    private Byte type;

    public Video getVideo() {
        return video;
    }

    public void setVideo(Video video) {
        this.video = video;
    }

    public Image getImage() {
        return image;
    }

    public void setImage(Image image) {
        this.image = image;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "MultiMedia{" +
                "video=" + video.toString() +
                ", image=" + image.toString() +
                ", type=" + type +
                '}';
    }
}
